//
//  UIScreen.swift
//  
//
//  Createtensd by tangbl93 on 2021/1/8.
//

import UIKit

public extension UIScreen {
    
    /// The screen scale
    static var yx_scale: CGFloat {
        return UIScreen.main.scale
    }
    
    /// The screen size
    static var yx_size: CGSize {
        return UIScreen.main.bounds.size
    }
    
    /// The screen's width
    static var yx_width: CGFloat {
        return UIScreen.main.bounds.size.width
    }
    
    /// The screen's height
    static var yx_height: CGFloat {
        return UIScreen.main.bounds.size.height
    }
    
    /// The screen's DPI size
    static var yx_DPISize: CGSize {
        let size: CGSize = UIScreen.yx_size
        let scale: CGFloat = UIScreen.yx_scale
        return CGSize(width: size.width * scale, height: size.height * scale)
    }
}
